var config = require("../../config.js");
Page({
  data:{
    studentsList:[]
  },
    onLoad:function(){
      this.getList();
    },
    goback:function(){
        wx.switchTab({url:"/pages/index/index"});
    },
    getList() {
      wx.request({
        url: `${config.baseUri}/student/${config.userId}/page`,
        method: 'POST',
        data:{
         
        },
        success: (res) => {
          console.log(res),
            this.setData({
              studentsList: [...this.data.studentsList, ...res.data.data.records]
            })
        }
      })
    }
})